class Note < ActiveRecord::Base
  belongs_to :project
  belongs_to :task
  belongs_to :user
  
  #has_many :contacts, :through => :notes_contacts
  
  has_many :notes_contacts
  has_many :contacts, :through => :notes_contacts

  
  validates_presence_of :title, :body
  
  def self.all_notes
    Note.find(:all)
  end
end
